package com.ruoyi.web.controller.tool.oss.qiniuyun;

import com.ruoyi.common.response.Result;
import com.ruoyi.inspection.service.QiNiuYunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/*
 * @Author:rain
 * */
@RestController
@RequestMapping("/qiNiuYun")
public class QiNiuYunController {

    @Autowired
    private QiNiuYunService qiNiuYunService;

    @PostMapping("/upload")
    public Result upload(@RequestParam("file") MultipartFile file) throws IOException {
        return qiNiuYunService.upload(file);
    }
}
